package com.demo.androidtv;

import android.app.Application;
import android.content.Intent;
import android.widget.ImageView;

import com.demo.androidtv.services.WebSocketServerService;

import org.xutils.x;
import org.xutils.image.ImageOptions;

public class App extends Application {
    public static ImageOptions ImageOptions;

    @Override
    public void onCreate() {
        super.onCreate();

        x.Ext.init(this);

        ImageOptions.Builder imageOptionsBuilder = new ImageOptions.Builder();
//        imageOptionsBuilder.setSize(-1, -1);
//        imageOptionsBuilder.setImageScaleType(ImageView.ScaleType.CENTER_CROP);
        imageOptionsBuilder.setPlaceholderScaleType(ImageView.ScaleType.FIT_CENTER);
//        imageOptionsBuilder.setFailureDrawableId(R.drawable.book);
        ImageOptions = imageOptionsBuilder.build();

        startService(new Intent(this, WebSocketServerService.class));
    }
}
